package com.egoo.ticket.server.service;

import com.alibaba.fastjson.JSONObject;
import com.egoo.ticket.server.pojo.vo.InteractiveDataVo;
import com.egoo.ticket.server.pojo.vo.WorkOrderTypeNodeVo;
import com.egoo.ticket.server.utils.common.DbResponse;

import java.util.List;

/**
 * @author Administrator
 */
public interface WorkOrderTypeNodeService {
	/**
	 * TODO 创建工单类型节点
	 * @author: victor_tang
	 * @createtime: 2020/3/19 16:27
	 * @param workOrderTypeNodeVo 1
	 * @return: java.lang.Integer
	 */
	Integer create(WorkOrderTypeNodeVo workOrderTypeNodeVo);

	/**
	 * TODO 获取工单类型节点label/value值
	 * @author: victor_tang
	 * @createtime: 2020/3/19 16:27
	 * @param workOrderTypeId 1
	 * @param tenantId 2
	 * @return: java.utils.List<com.egoo.ews.service.vo.InteractiveData>
	 */
	List<InteractiveDataVo> selectByWorkOrderTypeId(Long workOrderTypeId, String tenantId);

	/**
	 * TODO 根据工单类型id查询其节点所有信息列表
	 * @param workOrderTypeId
	 * @param tenantId
	 * @return
	 */
	List<WorkOrderTypeNodeVo> selectFormkeyByWorkOrderTypeId(Long workOrderTypeId, String tenantId);

	/**
	 * TODO:根据工单类型节点id查询节点信息
	 * @param workOrderTypeNodeId
	 * @param tenantId
	 * @return
	 */
	WorkOrderTypeNodeVo getNodeInfoByWorkOrderTypeId(Long workOrderTypeNodeId, String tenantId);
	/**
	 * TODO 根据工单类型id和类型节点名称查询节点label/value列表
	 * @author: victor_tang
	 * @createtime: 2020/3/19 16:32
	 * @param workOrderTypeId 1
	 * @param nodeName 2
	 * @param tenantId 3
	 * @return: java.utils.List<com.egoo.ews.service.vo.InteractiveData>
	 */
	List<InteractiveDataVo> selectByWorkOrderTypeIdAndNodeName(Long workOrderTypeId, String nodeName, String tenantId);
	/**
	 * TODO 根据工单类型节点id获取节点label/value值
	 * @author: victor_tang
	 * @createtime: 2020/3/19 16:33
	 * @param workOrderNodeId 1
	 * @return: com.egoo.ews.service.vo.InteractiveData
	 */
	InteractiveDataVo selectByWorkOrderNodeId(Long workOrderNodeId);

	/**
	 * TODO:根据工单类型节点id查询节点处理人信息
	 * @param workOrderTypeNodeId
	 * @param tenantId
	 * @param userId
	 * @return
	 */
	JSONObject getNodeHandleUserInfoByWorkOrderTypeId(Long workOrderTypeNodeId, String tenantId, String userId);

	/**
	 * TODO
	 * @param workOrderTypeId
	 * @return
	 */
	DbResponse getTemplateFromOfStartNode(Long workOrderTypeId);
}
